﻿<UserControl x:Class="jSLCore.Client.Presentation.Multimedia.Players.jMusicPlayer"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
	<UserControl.Resources>
		<Storyboard x:Name="PlayPlaying" RepeatBehavior="Forever">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="image">
				<EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.6" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="image1">
				<EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.6" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.9" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="image2">
				<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.7" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.9" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
	</UserControl.Resources>
    <StackPanel Orientation="Vertical">
        <StackPanel Orientation="Horizontal">
            <Image Name="playStop" Source="../Resources/play_Disabled.png" Width="48" Height="48" Margin="5" Cursor="Hand" MouseLeftButtonDown="playStop_Clicked"/>
            <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="6">
            <TextBlock Name="curTime" Text="0:00" Margin="0"/>
                <TextBlock Text=" / "  Margin="0"/>
                <TextBlock Name="overAllTime" Text="0:00"  Margin="0"/>
            </StackPanel>            
            <Image VerticalAlignment="Center" Width="32" Height="32" Source="../Resources/error.png" Name="failImage" Visibility="Collapsed" ToolTipService.ToolTip="Не удалось воспроизвести файл"  Margin="0"/>
            <StackPanel Name="playingPanel" Orientation="Horizontal" VerticalAlignment="Center" Margin="5">
                <Image x:Name="image" Width="16" Height="16" Source="../resources/PlayMini.png" Opacity="0"  Margin="0"/>
                <Image x:Name="image1" Width="16" Height="16" Source="../resources/PlayMini.png" Opacity="0"  Margin="0"/>
                <Image x:Name="image2" Width="16" Height="16" Source="../resources/PlayMini.png" Opacity="0"  Margin="0"/>
            </StackPanel>
        </StackPanel>
        <Slider Margin="5" Name="curPosition" MouseLeftButtonUp="seekToMedia" MouseLeftButtonDown="seekToMediaStarted" IsEnabled="False"/>
        <MediaElement 
            Name="mainPlayer" 
            AutoPlay="False" 
            BufferingTime="0:0:30"             
            MediaEnded="media_Ended"
            MediaFailed="media_Failed"     
            MediaOpened="opened"/>        
        	</StackPanel>      
		</UserControl>
